package com.gnerv.sylvanas.assembly.autoconfigure;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Gnerv LiGen
 */
@Slf4j
@Configuration
@ConditionalOnWebApplication
@EnableConfigurationProperties({SylvanasCoreConfigProperties.class})
public class SylvanasCoreAutoConfiguration {

    /**
     * 自定义tomcat启动端口
     *
     * @return
     */
//    @Bean
//    public TomcatConnectorCustomizer tomcatConnectorCustomizer() {
//        return connector -> {
//            connector.setPort(8902);
//            connector.setMaxPostSize(10 * 1024 * 1024);
//        };
//    }

}
